package com.chixing.day06_static.abstract_demo;

import java.util.Calendar;

public class AccoountTest {
    public static void main(String[] args) {
        SavingAccount savingAccount = new SavingAccount();
        CreditAccount creditAccount = new CreditAccount();

        //不具有实际的业务意义
        //抽象类不能实例化对象Account account = new Account();

        Calendar calendar = Calendar.getInstance();
        System.out.println(calendar.get(Calendar.YEAR));

        //【多态】
        //父类引用子类对象
        Account account = new SavingAccount();
        //子类重写父类的方法
        account.depoist(100);

    }
}
